# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=unfs3
pkgver=0.10.0
pkgrel=2
pkgdesc="user-space implementation of the NFSv3 server specification"
options="!check" # No testsuite
url="https://unfs3.github.io/"
arch="all"
license="BSD-3-Clause"
depends="rpcbind"
makedepends="flex-dev libtirpc-dev byacc"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/unfs3/unfs3/releases/download/unfs3-$pkgver/unfs3-$pkgver.tar.gz
	implicit.patch
	lfs64.patch
	unfs3.confd
	unfs3.initd
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

package() {
	make DESTDIR="$pkgdir/" install
	install -D -m0644 "$srcdir"/unfs3.confd "$pkgdir"/etc/conf.d/unfs3
	install -D -m0755 "$srcdir"/unfs3.initd "$pkgdir"/etc/init.d/unfs3
}

sha512sums="
4d62b45f133a1929fc0faacfc7a483126767519332c5a311d44b1d048a6c580280299ffb70114a1c405666d730953d436957c04a3350329aa3de5256d0d3e85a  unfs3-0.10.0.tar.gz
5b564890003d3d4ba28e2efcdd42d920ba679d2f4154fb64d33a064b90a956ca4918d943fca71e1ffa2fa4b43a1af12b322bd9c5400e9ec3b4a33db14c5fa47f  implicit.patch
f02a60582f5959a9f5e504c3761a924e30180556432d262f3f12caf861d374d21da67d2ebed175db5acb16e97b70d2f730c8b1131bf6a1a3fc05bd739d7266c7  lfs64.patch
e3a3b7a71117482fd3214eadfd957f5cd3f05da268f748f931945c390f1d8e46e19b33d53b2ce0505c61745f8dd6285f7a9de409196fedef07d23ae029f1c035  unfs3.confd
105b1ac6d0a65b3ba19bb8ada17d1ae865cf14e71e6a3838df1e6d34d2738457f0019258fd10a4594783074c10be44db75417677290bdd6862ba73b4c370b07e  unfs3.initd
"
